package com.designpatterns.behavioral.decorator;

public class Client {
    public static void main(String[] args) {
        Component component = new Window(); //使用抽象构件定义对象，创建具体构件对象
        Component componentSB = new ScrollBarDecorator(component); //创建装饰后的构件对象
        //进行第二次装饰
        componentSB = new BlackBorderDecorator(componentSB);
        componentSB.display();
    }
}
